#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
using namespace std;

vector<vector<int>> ret;
vector<int> tmp;

void dfs(vector<int>& nums, int index)
{
    if (index == nums.size())
    {
        ret.push_back(tmp);
        return;
    }
    tmp.push_back(nums[index]);
    dfs(nums, index + 1);
    tmp.pop_back();
    dfs(nums, index + 1);
}
vector<vector<int>> subsets(vector<int>& nums) {
    dfs(nums, 0);
    return ret;
}


int main()
{
    vector<int> nums = { 1,2,3 };
    subsets(nums);
	return 0;
}